$(function() {
	//选择客户刷新
	$('#memorial-form-client-combobox').combobox({
		onChange : function() {
			var value = $('#memorial-form-contact-combobox').combobox('getValue');
			if (value == null || value == "") {
				$('#memorial-form-contact-combobox').combobox({
					url : 'memorial-find-contact-id-name-by-cid',
					method : 'post',
					queryParams : {
						cid : $('#memorial-form-client-combobox').combobox('getValue')
					}
				})
			}
		}
	})

	$('#memorial-form-contact-combobox').combobox({
		onChange : function() {
			var clientValue = $('#memorial-form-client-combobox').combobox('getValue');
			if (clientValue == null || clientValue == "") {
				$('#memorial-form-client-combobox').combobox({
					url : 'memorial-find-clientInfo-by-contactid',
					method : 'post',
					queryParams : {
						contactid : $('#memorial-form-contact-combobox').combobox('getValue') == null ? -1 : $('#memorial-form-contact-combobox').combobox('getValue')
					}
				});
			}
		}
	});

});